TOP:=${PWD}
LIB_DIR:=$(TOP)/build/obj

module_libcore_path:=$(TOP)/core
module_libapi_path:=$(TOP)/api
module_libopendpi_demo_path:=$(TOP)/test/opendpi/opendpi/src/examples/OpenDPI_demo
module_libadvanceDetect_path:=$(TOP)/test/opendpi/advanceDetect
module_libmemoryOperation_path:=$(TOP)/test/opendpi/memoryOperation
module_liblib_path:=$(TOP)/test/opendpi/opendpi/src/lib
module_libprotocols_path:=$(TOP)/test/opendpi/opendpi/src/lib/protocols
module_liboutput_path:=$(TOP)/test/opendpi/output
module_libhttp_parse_path:=$(TOP)/test/http_parse

all:
include $(TOP)/build/extra.mk
include $(module_libcore_path)/core_me.mk
include $(module_libapi_path)/api_me.mk
include $(module_libopendpi_demo_path)/OpenDPI_demo_me.mk
include $(module_libadvanceDetect_path)/advanceDetect_me.mk
include $(module_libmemoryOperation_path)/memoryOperation_me.mk
include $(module_liblib_path)/lib_me.mk
include $(module_libprotocols_path)/protocols_me.mk
include $(module_libhttp_parse_path)/http_parse_me.mk
include $(module_liboutput_path)/output_me.mk

allmodule:=module_libcore module_libapi module_libopendpi_demo module_libadvanceDetect module_libmemoryOperation module_liboutput module_liblib module_libprotocols module_libhttp_parse
all:
	@$(MAKE) $(allmodule)
	gcc $(CFLAGS_GLOBAL) $(LIB_DIR)/libcore.a $(LIB_DIR)/libapi.a $(LIB_DIR)/libopendpidemo.a $(LIB_DIR)/liblib.a $(LIB_DIR)/libadvanceDetect.a $(LIB_DIR)/libmemoryOperation.a $(LIB_DIR)/liboutput.a $(LIB_DIR)/libprotocols.a $(LIB_DIR)/libhttp_parse.a -lpcap -ldl -lm -lrt /usr/lib/libmysqlclient.so -MD -o NeTIA

clean:
	@rm ./build/obj/* 
